package com.bookcloud.java21.chapter4.继承方法重写411;

public class TestAnimal {
  public static void main(String[] args) {
    Cat cat = new Cat("小猫咪", 1);
    cat.eat();
    // dog
    Dog dog = new Dog("小狗狗", 2);
    dog.eat();
    // PIG
    Pig pig = new Pig("佩奇", 3);
    pig.eat();
  }
}
